package io.work;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class test2 {
    public static void main(String[] args) throws Exception {
        FileInputStream fis =new FileInputStream("v12.jpg");
        FileOutputStream fos =new FileOutputStream("v12_cp.jpg");
        int d;
        long start=System.currentTimeMillis();

        while ((d= fis.read())!=-1){

            fos.write(d);

        }
        long end=System.currentTimeMillis();
        System.out.println("复制完毕,用时"+(start-end)+"ms");
        fis.close();
        fos.close();

    }
}
